<template>
    <div class="m-cmmt">
        <div class="iptarea">
            <div class="head">
                <img src="/src/assets/comment_img/user.jpg">
            </div>
            <div>
                <div>
                    <div class="m-cmmt-ipt clear-block f-pr" style="display: block;">
                        <div class="u-txtwrap holder-parent f-pr" style="display: block;">
                            <textarea class="u-txt area" placeholder="评论"></textarea>
                        </div>
                        <div class="btns clear-block f-pr">
                            <i class="icn u-icn u-icn-emotion"></i>
                            <i class="icn u-icn u-icn-call"></i>
                            <a href="javascript:void(0)" class="btn u-btn u-btn-1">评论</a>
                            <span class="zs s-fc4">140</span>
                        </div>

                        <div class="corr u-arr">
                            <em class="arrline">◆</em>
                            <span class="arrclr">◆</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="cmmts">
            <h3 class="u-hd4">精彩评论</h3>
            <CommentItem v-for="(item, index) in commentData" v-bind="{...item}" key="index"></CommentItem>
            <br>
            <br>
            <h3 class="u-hd4">最新评论</h3>
            
            <CommentItem v-for="(item, index) in commentData" v-bind="{...item}" key="index"></CommentItem>

        </div>

            <Pagination></Pagination>
    </div>
</template>
<script setup>
    import CommentItem from './CommentItem.vue';
    import Pagination from './Pagination.vue';
    defineProps({
        commentData: Array
    })

    
</script>
<style lang="scss" scoped>
.m-cmmt {
    margin-top: 20px;

    .iptarea {
        margin-bottom: 20px;

        .m-cmmt-ipt {
            margin-left: 62px;

            .u-txtwrap {
                padding-right: 14px;

            }

            .area {
                height: 50px;
                display: block;
            }

            .u-txt {
                width: 100%;
                margin-right: -20px;
                margin: 0;
                padding: 5px 6px 6px;
                border: 1px solid #cdcdcd;
                border-radius: 2px;
                line-height: 19px;
                box-sizing:content-box;
            }

            textarea {
                resize: none;
                overflow: auto;
            }

            .btns {
                clear: both;
                padding-top: 10px;

                .icn {
                    float: left;
                    margin: 0 10px 0 0;
                    cursor: pointer;
                }

                .u-icn {
                    display: inline-block;
                    overflow: hidden;
                    vertical-align: middle;
                }

                .u-icn-emotion {
                    width: 18px;
                    height: 18px;
                    background-position: -40px -490px;
                }

                .u-icn-call {
                    width: 18px;
                    height: 18px;
                    background-position: -60px -490px;
                }

                .btn {
                    float: right;
                }

                .u-btn-1 {

                    width: 46px;
                    height: 25px;
                    background-position: -84px -64px;
                    color: #fff;
                    text-align: center;
                    line-height: 25px;
                    text-decoration: none;

                    &:hover{
                        background-position: -84px -94px;
                    }
                }

                .u-btn {
                    display: inline-block;
                }

                .zs {
                    float: right;
                    margin-right: 10px;
                    line-height: 25px;
                }
            }

            .u-arr {
                width: 13px;
                height: 14px;
                overflow: hidden;

                .arrline {
                    color: #cdcdcd;
                }

                .arrclr {
                    margin: -10px 0 0 1px;
                    color: #fff;
                }

                .arrline,
                .arrclr {
                    display: block;
                    font-family: "SimSun";
                    font-size: 15px;
                    font-style: normal;
                    font-weight: normal;
                    height: 10px;
                    line-height: normal;
                }
            }

            .corr {
                position: absolute;
                top: 11px;
                left: -7px;
            }
        }
    }

    .head {
        float: left;
        width: 50px;
        height: 50px;
        margin-right: -100px;

        img {
            float: left;
            width: 50px;
            height: 50px;
            margin-right: -100px;
        }
    }

    .cmmts {
        .u-hd4 {
            position: relative;
            top: 1px;
            height: 20px;
            border-bottom: 1px solid #cfcfcf;
        }



    }
}
</style>